<template>
  <div class="common-layout">
    <el-container>
      <el-aside width="300px">
        <el-menu
          active-text-color="#ffd04b"
          background-color="#545c64"
          class="el-menu-vertical-demo"
          default-active="1"
          text-color="#fff"
          @open="handleOpen"
          @close="handleClose"
        >
          <el-menu-item index="0">
            <span>@郑三明</span>
          </el-menu-item>
          <el-menu-item
            index="1"
            @click="$router.push({ path: '/index/brand' })"
          >
            <span> 品牌管理 </span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-container>
        <router-view></router-view>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  setup() {
    const handleOpen = (key, keyPath) => {
      console.log(key, keyPath);
    };
    const handleClose = (key, keyPath) => {
      console.log(key, keyPath);
    };

    return {
      handleOpen,
      handleClose,
    };
  },
};
</script>

<style scoped>
.el-aside {
  background: #545c64;
  color: #ffffff;
  height: 100vh;
}
</style>